# -*- coding: utf-8 -*-
# FileName: filters.py
# Create by Hardy on 2020/07/22
# Description:

import django_filters
from schools.models import Student, Article


class StudentFilter(django_filters.FilterSet):
    class Meta:
        model = Student
        fields = {
            'name': ['icontains', ],
        }


class ArticleFilter(django_filters.FilterSet):
    class Meta:
        model = Article
        fields = {
            'title': ['icontains', ],
            'author': ['icontains', ],
            'keyword': ['icontains', ],
        }
